xferWindow = '';
tmpVal = 0;
function HideHelp(){
	document.getElementById("Help").style.display = "none";
	document.getElementById("helper").style.display = "inline";
	document.getElementById("closehelp").style.display = "none"; }
function ShowHelp(){
   	document.getElementById("Help").style.display = "block";
	document.getElementById("helper").style.display = "none";
	document.getElementById("closehelp").style.display = "inline"; }
function focusInput(){
	document.getElementById("input_string").focus();
    document.getElementById("helper").style.display = "inline"; }
function xferValue(){
xferWindow.document.getElementById('xferArea').value = tmpVal;	}
function getValue(){
tmpVal = document.getElementById('output_string').value;
xferWindow = window.open('telugu-editor.html');
xferWindow.opener = self; }	

function palaka_convert() {
//	alert("In palaka Convert");
	var temp_output_string = document.getElementById("output_string");
	// alert(temp_output_string );
	var temp_input_string = document.getElementById("input_string");
	// alert(temp_input_string );
/* Since we are converting only from RTS to Unicode ( that too telugu )  we are sending the values specified by Padma by leaving the rest of values */
/* Appeding # because padma converts the text in BTW # to telugu */
	var input = "#" + temp_input_string.value + "#";
/* Directly calling the transformer leaving rest of the funtions 0 for RTS 1 for Unicode*/
//	alert("Palaka.js >> before creating transformer");
	var transformer = Transformer.createTransformer(0, 1);
	transformer.setRTSMode(RTSTransformer.rtsEnglish);
//	alert("Palaka.js >> created transformer and waiting for ouput");
	/* taking the output from the transformer */
	var output = transformer.convert(input);
//	alert("Palaka.js >> ouput received");
  	temp_output_string.value = output;
	temp_input_string.focus();
	// Auto-scroll
	if (temp_input_string.scrollHeight - temp_input_string.clientHeight == temp_input_string.scrollTop) {
		temp_output_string.scrollTop = temp_output_string.scrollHeight - temp_output_string.clientHeight;
	}
	else {
		temp_output_string.scrollTop = temp_input_string.scrollTop * 1.4375;
	}
}
